{extend name="default/base/base_seller" /}
{block name="seller_main"}



<form method="get" action="">
    <input type="hidden" name="lock" value="{$Request.param.lock}" />
    <table class="search-form">
        <tr>
            <td>&nbsp;</td><th>{$Think.lang.return_order_add_time}</th>
            <td class="w240">
                <input type="text" class="text w70" name="add_time_from" id="add_time_from" value="{$Request.param.add_time_from}" />
                <label class="add-on"><i class="iconfont">&#xe8d6;</i></label>&nbsp;&#8211;&nbsp;
                <input id="add_time_to" type="text" class="text w70"  name="add_time_to" value="{$Request.param.add_time_to}" />
                <label class="add-on"><i class="iconfont">&#xe8d6;</i></label>
            </td>
            <th class="w60">{$Think.lang.processing_state}</th>
            <td class="w80">
                <select name="state">
                    <option value="" {if condition="$Request.param.state eq ''"}selected{/if}>{$Think.lang.ds_all}</option>
                    <option value="1" {if condition="$Request.param.state eq '1'"}selected{/if}>{$Think.lang.refund_state_confirm}</option>
                    <option value="2" {if condition="$Request.param.state eq '2'"}selected{/if}>{$Think.lang.refund_state_yes}</option>
                    <option value="3" {if condition="$Request.param.state eq '3'"}selected{/if}>{$Think.lang.refund_state_no}</option>
                </select>
            </td>
            <th class="w120">
                <select name="type">
                    <option value="order_sn" {if condition="$Request.param.type eq 'order_sn'"}selected{/if}>{$Think.lang.return_order_ordersn}</option>
                    <option value="return_sn" {if condition="$Request.param.type eq 'return_sn'"}selected{/if}>{$Think.lang.return_order_returnsn}</option>
                    <option value="buyer_name"{if condition="$Request.param.type eq 'buyer_name'"}selected{/if}>{$Think.lang.return_order_buyer}</option>
                </select>
            </th>
            <td class="w160"><input type="text" class="text" name="keyword" value="{$Request.get.keyword}" /></td>
            <td class="w70 tc"><input type="submit" class="submit" value="{$Think.lang.ds_search}" /></td>
        </tr>
    </table>
</form>
<table class="dssc-default-table">
    <thead>
        <tr>
            <th class="w10"></th>
            <th colspan="2">{$Think.lang.merchandise_order_refund}</th>
            <th class="w150">{$Think.lang.refund_order_refund}</th>
            <th class="w150">{$Think.lang.return_order_return}</th>
            <th class="w150">{$Think.lang.refund_order_buyer}</th>
            <th class="w150">{$Think.lang.refund_order_add_time}</th>
            <th class="w150">{$Think.lang.processing_state}</th>
            <th class="w150">{$Think.lang.platform_confirm}</th>
            <th>{$Think.lang.ds_handle}</th>
        </tr>
    </thead>
    
    <tbody>
        {notempty name="return_list"}
        {foreach name="return_list" item="val" key="key" }
        <tr class="bd-line" >
            <td></td>
            <td class="w50">
                <div class="pic-thumb"><a href="{:url('Goods/index',['goods_id'=>$val.goods_id])}" target="_blank">
                        <img src="{:goods_thumb($val, 240)}" /></a>
                </div>
            </td>
            <td title="{$val.store_name}">
                <dl>
                    <dt><a href="{:url('Goods/index',['goods_id'=>$val.goods_id])}" target="_blank">{$val.goods_name}</a></dt>
                    <dd>{$Think.lang.refund_order_ordersn}{$Think.lang.ds_colon}<a href="{:url('Sellerorder/show_order',['order_id'=>$val.order_id])}" target="_blank">{$val.order_sn}</a></dd>
                    <dd>{$Think.lang.return_order_returnsn}{$Think.lang.ds_colon}{$val.refund_sn}</dd>
                </dl>
            </td>
            <td>{$Think.lang.currency}{$val.refund_amount}</td>
            <td>{if $val.return_type == 2}{$val.goods_num}{else/}{$Think.lang.there_no}{/if}</td>
            <td>{$val.buyer_name}</td>
            <td>{$val.refundreturn_add_time|date="Y-m-d H:i:s"}</td>
            <td>{$val.refundreturn_seller_state_desc}</td>
            <td>{if $val.refundreturn_seller_state == 2 && $val.refundreturn_admin_state >= 2}{$val.refundreturn_admin_state_desc}{else/}{$Think.lang.there_no}{/if}</td>
            <td class="dscs-table-handle">
                {if $val.refundreturn_seller_state == 1}
                <span><a href="{:url('Sellerreturn/edit',['return_id'=>$val.refund_id])}" class="btn-blue"><i class="iconfont">&#xe731;</i><p>{$Think.lang.deal_with}</p></a></span>
                {else /}
                <span> <a href="{:url('Sellerreturn/view',['return_id'=>$val.refund_id])}" class="btn-orange"><i class="iconfont">&#xe70b;</i><p>{$Think.lang.ds_view}</p></a></span>
                {/if}
                {if $val.refundreturn_seller_state == 2 && $val.return_type == 2 && $val.refundreturn_goods_state == 2}
                <span><a href="javascript:void(0)" class="btn-green" ds_type="dialog" dialog_title="{$Think.lang.ds_edit}" dialog_id="return_order" dialog_width="480" uri="{:url('Sellerreturn/receive',['return_id'=>$val.refund_id])}"><i class="iconfont">&#xe6e9;</i><p>{$Think.lang.goods_receipt}</p></a></span>
                {/if}
            </td>
        </tr>
        {/foreach}
        {else /}
        <tr>
            <td colspan="20" class="norecord"><div class="warning-option"><i class="iconfont">&#xe64c;&nbsp;</i><span>{$Think.lang.no_record}</span></div></td>
        </tr>
        {/notempty}
    </tbody>
    <tfoot>
        {notempty name="return_list"}
        <tr>
            <td colspan="20"><div class="pagination">{$show_page|raw}</div></td>
        </tr>
        {/notempty}
    </tfoot>
</table>
<script>
    $(function () {
        $('#add_time_from').datepicker({dateFormat: 'yy-mm-dd'});
        $('#add_time_to').datepicker({dateFormat: 'yy-mm-dd'});
    });
</script>


{/block}
